using System.ComponentModel.DataAnnotations;

namespace AIoTGateway_UI.Data.Models;

public class Device
{
    [Key]
    public int Id { get; set; }
    ///
    /// <summary>
    /// “SN” 即 “Serial Number”，表示设备的序列号，在硬件设备中经常会用到这个命名。
    [Required]
    public int DeviceSN { get; set; }
    [Required]
    public int WorkshopId { get; set; }    
    [Required]
    [MaxLength(100)]
    public string Name { get; set; } = string.Empty;    
    public int Type { get; set; }    
    public int Status1 { get; set; }    
    public int Status2 { get; set; }    
    [MaxLength(500)]
    public string Description { get; set; } = string.Empty;    
    public Workshop? Workshop { get; set; }
}